<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="app">
     <ul>
        <li v-for="(item, index) in users" :key="index">{{item}}</li>
     </ul>
    </div>
</body>

<script src="./node_modules/vue/dist/vue.js"></script>
<script src="./node_modules/axios/dist/axios.js"></script>
<script>
    let vm=new Vue({
        el:"#app",
        data() {
            return {
                users:[]
            }
        },
        mounted() {
            this.getAllUsers();
        },
        methods: {
            getAllUsers(){
                axios.get('http://localhost:8080/user/getAllUsers',{
                    params:{
                        id: 1
                    }
                })
                // .then(function(response){
                //  vm.users=response.data.data;
                // })
                .then(response=>{
                    this.users=response.data.data;
                })
                .cath(function(error){
                    console.log(error)
                });
            }
        },
    })
</script>
</html>